package com.xhej.rowreat.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.xhej.rowreat.mapper.UserMapper;
import com.xhej.rowreat.model.User;
import com.xhej.rowreat.service.UserService;
@Service
public class UserServiceImpl implements UserService {
	
	@Autowired
	private UserMapper userMapper;
	
	public List<User> getAllUser() {
		PageHelper.startPage(1, 5);
	    return userMapper.selectAll();
	}

	@Override
	public int insertUser() {
		User user =new User();
		user.setUsername("888");
		userMapper.insertSelective(user);
		user.getUsername();
		return 0;
	}
}
